package com.guiguli.StringJoiner.for_while;

import java.util.Scanner;
//回文数
public class whilePalindrome {
    public static void main(String[] args) {
        System.out.println("请输入一个整数");
        Scanner sc=new Scanner(System.in);
        int number=sc.nextInt();
        int temp=number;
        int number2=0;
        while(number!=0){
            number2=number2*10+number%10;
            number/=10;
        }
        if(temp==number2){
            System.out.println(temp+"是回文数");
        }
        else{
            System.out.println("不是回文数");
        }
    }
}
